<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <script src="./vue.min.js"></script>
</head>

<body>
  <div id="app">
    <template v-for="(item,i) in attrs" :key="i">
      <parent :level="item">1212</parent>
    </template>
  </div>

  <script>
    var parent={
      props:['level'],
      render:function(createElement){
        
        return createElement(
           'h'+this.level,
           this.$slots.default
        )
      }
    }
    var vm = new Vue({
      el: '#app',
      data: {
        attrs:[1,2,3,4,5,6]
      },
      methods: {},
      components:{
        parent
      }
    });
  </script>
</body>

</html>